RootFolder Property (InfoStore Object) 

The RootFolder property returns a folder object representing the root of the IPM tree for this InfoStore object. Read-only.

Syntax

set objFolder = objInfoStore.RootFolder

Data Type

Object (Folder object)

Remarks

The RootFolder property provides a convenient way to get to this commonly used Folder object.

In addition to the general ability to navigate through the formal collection and object hierarchy, the OLE Messaging Library supports properties that allow your application to directly access the most common folder objects: 

    The IPM subtree

    Inbox

    Outbox

 

Some message stores also support a way to obtain the root folder. For more information, see the documentation for the Session object s GetFolder method.

Example

' from InfoStores_RootFolder

    If objInfoStore Is Nothing Then

        MsgBox "must first select an InfoStore object"

        Exit Function

    End If

    Set objFolder = objInfoStore.RootFolder

    If objFolder Is Nothing Then

        MsgBox "Unable to retrieve InfoStore root folder"

        Set objMessages = Nothing

        Exit Function

    End If

    If objFolder.Name = "" Then

        MsgBox "Folder set to folder with no name, ID = " & objFolder.Id

    Else

        MsgBox "Folder set to: " & objFolder.Name

    End If

    Set objMessages = objFolder.Messages

    Exit Function

 

See Also

Folder ObjectKM47H0, GetFolder Method (Session Object)67IU1J, Inbox Property (Session Object)1BPW5IP, Outbox Property (Session Object)1Q5W.E